import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Transform Widget Demo"),
      ),
      body: TransformWidget(),
    ),
  ));
}

class TransformWidget extends StatelessWidget {
  const TransformWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.black,
      child: Transform(
        alignment: Alignment.topRight, //相对于坐标系原点的对齐方式
        transform: Matrix4.skewX(0.3), //沿Y轴倾斜0.3弧度
        child: Container(
          padding: const EdgeInsets.all(8.0),
          color: Colors.deepOrange,
          child: const Text("Apartment for rent !"),
        ),
      ),
    );
  }
}
